package com.abetsy.vben.utils.i18n;

import com.github.yulichang.toolkit.SpringContentUtils;
import org.springframework.context.MessageSource;
import org.springframework.context.i18n.LocaleContextHolder;

import java.util.Locale;

public class I18nUtil {

    public static String info(String msg, Object... args) {
        MessageSource messageSource = SpringContentUtils.getBean(MessageSource.class);
        Locale locale = LocaleContextHolder.getLocale();
        return messageSource.getMessage(msg, args, locale);
    }

}
